<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript">
    function disp_prompt(){
      let name = prompt("Please enter your name", "");
      if (name!=null &&name!=""){
        document.write("Hello " +name + "!")
      }
    }
  </script>
</head>
<body>
<input type="button" onclick="disp_prompt()" value="请点击"/>
</body>
</html>